It is required in certain processes to determine which value in a set of values is the minimum value or the maximum value in the set. In most applications, it is sufficient to access each of the values in a stored set of data and to compare the values to each other to determine the minimum and maximum values.
FIG. 1 is a diagram illustrating eight memory registers 101-108 in which eight different values are stored. A number of methods are known for searching through the stored memory values to determine, for example, a minimum value. The registers may be searched sequentially until it is determined that the value 12 stored in memory register 106 is the minimum value.
One method is to compare the first register to the second and then compare the lesser or those two registers to the third and the lesser or that comparison to the fourth and so on. This method requires N-1 clock cycles to complete assuming one comparison is performed per clock cycle (If a comparison takes more than a clock cycle, then (N-1) would be multiplied by the appropriate number of cycles). This method is slow for large data sets and an improved method can be envisioned in which the cells are divided into pairs and each register of each pair is compared with another register in the pair with the lesser values from each pair being noted and paired again for comparison during a subsequent clock cycle. This parallel method would take fewer clock cycles than the first described method (log.sub.2 N cycles compared to N-1 cycles), but would still require multiple cycles to derive the minimum stored value.
In certain applications, quickly determining a minimum stored value from among a group of values is important, and it would be desirable to determine such a minimum value within fewer clock cycles, and ideally, within a single clock cycle.